package com.dynamixsoftware.printershare.gmail;

import java.util.Vector;

public class ProtoBufType
{
  public static final int MASK_MODIFIER = 65280;
  public static final int MASK_TYPE = 255;
  public static final int OPTIONAL = 512;
  public static final int REPEATED = 1024;
  public static final int REQUIRED = 256;
  public static final int TYPE_BOOL = 24;
  public static final int TYPE_BYTES = 35;
  public static final int TYPE_DATA = 25;
  public static final int TYPE_DOUBLE = 17;
  public static final int TYPE_ENUM = 30;
  public static final int TYPE_FIXED32 = 23;
  public static final int TYPE_FIXED64 = 22;
  public static final int TYPE_FLOAT = 18;
  public static final int TYPE_GROUP = 26;
  public static final int TYPE_INT32 = 21;
  public static final int TYPE_INT64 = 19;
  public static final int TYPE_MESSAGE = 27;
  public static final int TYPE_SFIXED32 = 31;
  public static final int TYPE_SFIXED64 = 32;
  public static final int TYPE_SINT32 = 33;
  public static final int TYPE_SINT64 = 34;
  public static final int TYPE_STRING = 36;
  public static final int TYPE_TEXT = 28;
  public static final int TYPE_UINT32 = 29;
  public static final int TYPE_UINT64 = 20;
  public static final int TYPE_UNDEFINED = 16;
  private final Vector data = new Vector();
  private final String typeName;
  private final StringBuffer types = new StringBuffer();
  
  public ProtoBufType()
  {
    this.typeName = null;
  }
  
  public ProtoBufType(String paramString)
  {
    this.typeName = paramString;
  }
  
  public static boolean stringEquals(CharSequence var0, CharSequence var1) {
      if(var0 != var1) {
         if(var0 != null && var1 != null) {
            int var2 = var0.length();
            if(var2 == var1.length()) {
               if(var0 instanceof String && var1 instanceof String) {
                  return var0.equals(var1);
               }

               for(int var3 = 0; var3 < var2; ++var3) {
                  if(var0.charAt(var3) != var1.charAt(var3)) {
                     return false;
                  }
               }

               return true;
            }
         }

         return false;
      } else {
         return true;
      }
   }
  
  public ProtoBufType addElement(int paramInt1, int paramInt2, Object paramObject)
  {
    while (this.types.length() <= paramInt2)
    {
      this.types.append('\020');
      this.data.addElement(null);
    }
    this.types.setCharAt(paramInt2, (char)paramInt1);
    this.data.setElementAt(paramObject, paramInt2);
    return this;
  }
  
  public boolean equals(Object var1) {
      if(var1 != null) {
         if(this == var1) {
            return true;
         }

         if(this.getClass() == var1.getClass()) {
            ProtoBufType var2 = (ProtoBufType)var1;
            return stringEquals(this.types, var2.types);
         }
      }

      return false;
   }
  
  public Object getData(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= this.data.size())) {
      return null;
    }
    return this.data.elementAt(paramInt);
  }
  
  public int getModifiers(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= this.types.length())) {
      return 1536;
    }
    return 0xFF00 & this.types.charAt(paramInt);
  }
  
  public int getType(int paramInt)
  {
    if ((paramInt < 0) || (paramInt >= this.types.length())) {
      return 16;
    }
    return 0xFF & this.types.charAt(paramInt);
  }
  
  public int hashCode()
  {
    if (this.types != null) {
      return this.types.hashCode();
    }
    return super.hashCode();
  }
  
  public String toString()
  {
    return this.typeName;
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.gmail.ProtoBufType
 * JD-Core Version:    0.7.0.1
 */